//
//  CKTIcketCell.m
//  FreshBee
//
//  Created by chenkai on 16/10/18.
//  Copyright © 2016年 iOS013. All rights reserved.
//

#import "CKTIcketCell.h"

@interface CKTIcketCell ()

@property (weak, nonatomic) IBOutlet UIView *separatorLine;
@property (weak, nonatomic) IBOutlet UIImageView *corcleView;
@property (weak, nonatomic) IBOutlet UIImageView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *isUsed;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *circleLeftMarginConstraint;

@end

@implementation CKTIcketCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.circleLeftMarginConstraint.constant =
    [UIScreen mainScreen].bounds.size.width/10;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)changeGrayStyleForRow:(NSInteger)row{
    
    if(row == 0){
        self.separatorLine.hidden = NO;
        self.corcleView.image = [UIImage imageNamed:@"CKCIRCLE_YELLOW"];
        self.isUsed.hidden = YES;
        self.bgView.image = [UIImage imageNamed:@"v2_coupon_yellow"];
        return;
    }
    self.separatorLine.hidden = YES;
    self.corcleView.image = [UIImage imageNamed:@"CKCIRCLE_GRAY"];
    self.isUsed.hidden = NO;
    self.bgView.image = [UIImage imageNamed:@"v2_coupon_gray"];
}








@end
